package com.cqie.tes.controller;

import com.cqie.tes.comm.R;
import com.cqie.tes.domain.vo.tes.top.*;
import com.cqie.tes.service.ECharService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

@CrossOrigin
@RestController
@RequestMapping("/echar")
public class ECharController {

    @Autowired
    ECharService eCharService;
    // 榜单top10
    @PostMapping("/barTopTen")
    public R barTopTen(){
        return eCharService.barTopTen();
    }


    // 欢迎top7
    @PostMapping("/tableTopSeven")
    public R tableTopSeven(){

        return eCharService.tableTopSeven();
    }

    @PostMapping("/treeTarget")
    public R treeTarget(){

        return eCharService.targetTree();
    }


 }
